// LSL script generated: RLV-New.Updater.Update_Extern.lslp Sun May  2 00:09:51 Westeuropäische Sommerzeit 2010
integer listen_id;
key objektKey;

makeUpdate(){
    llSetText("Update Start",<1.0,0.0,1.0>,1);
    integer _Scripts = llGetInventoryNumber(10);
    integer i = 0;
    while ((i < _Scripts)) {
        string _Name;
        (_Name = llGetInventoryName(10,i));
        if ((_Name != llGetScriptName())) {
            llSetText(((("Update Script: " + ((string)i)) + " of ") + ((string)(_Scripts - 1))),<1.0,0.0,1.0>,1);
            llRemoteLoadScriptPin(objektKey,_Name,15385,1,0);
        }
        (i++);
    }
    llSetText("Update done",<1.0,0.0,1.0>,1);
    llListenRemove(listen_id);
    llSay(1336,llKey2Name(llGetOwner()));
    llSleep(5.0);
    llResetScript();
}
default {

	
    state_entry() {
        (listen_id = llListen(1336,"",NULL_KEY,""));
        llSetText("DV Updater",<1.0,0.0,1.0>,1);
    }

    
    listen(integer channel,string name,key id,string message) {
        if ((message == llKey2Name(llGetOwner()))) {
            (objektKey = id);
            makeUpdate();
        }
    }

    
    link_message(integer sender,integer num,string str,key id) {
    }

  	
  	timer() {
    }
}
